<?php 

/* Vanilla Journal
 * index.php
 * Weizhong Yang
 */

include("vj-header.php");

if($_GET['id']) {
   include("vj-include/vj.viewpost.php");
} else if($_GET['file']) {
   include("vj-include/vj.viewfile.php");
} else if($_GET['cat']) {
   include("vj-include/vj.viewcat.php");
} else {
   if($vj->info['frontpage'] == "all") {
      if($_GET['toc']) 
	 include("vj-include/vj.viewtoc.php");
      else
	 include("vj-include/vj.viewall.php");
   } 
   else {
      if($_GET['all']) 
	 include("vj-include/vj.viewall.php");
      else
	 include("vj-include/vj.viewtoc.php");
   }
}

?>
